package com.co.controller;

import com.co.utils.Constants;
import com.co.utils.JPage;

public class MainMenuPageController {

	private static MainMenuPageController mainMenuPageControllerInstance;
	private GlobalConfigurationManager gcmInstance;
	private ViewManager viewManager;
	private JPage page;

	public MainMenuPageController() {
		gcmInstance = GlobalConfigurationManager.getInstance();
		viewManager = ViewManager.getInstance();
	}

	public static MainMenuPageController getInstance() {
		if (mainMenuPageControllerInstance == null) {
			mainMenuPageControllerInstance = new MainMenuPageController();
		}
		return mainMenuPageControllerInstance;
	}

	private void setPage(JPage page) {
		this.page = page;
	}

	private JPage getPage() {
		return this.page;
	}

	public void configure(String pageId, JPage page) {
		setPage(page);
		// gcmInstance.setSuscription(id, loginPage);
		viewManager.suscriptPage(pageId, page);
	}

	public void goToObraSocialPage() {
		viewManager.goToPage(Constants.OBRA_SOCIAL_PAGE);

	}

}
